package com.ccrfid.rmc6.repository.personnel;

import com.ccrfid.rmc6.entity.personnel.PersonnelBloodPressureEntity;
import org.springframework.data.repository.Repository;

import java.sql.Timestamp;
import java.util.List;

public interface PersonnelBloodPressureRepository extends Repository<PersonnelBloodPressureEntity, Long> {

    PersonnelBloodPressureEntity getTopByPersonnelIdOrderByIdDesc(Long personnelId);

    List<PersonnelBloodPressureEntity> getAllByPersonnelIdAndRecordTimeBetweenOrderByIdAsc(Long personnelId, Timestamp start, Timestamp stop);

    List<PersonnelBloodPressureEntity> getAllByCardNumberAndRecordTimeBetween(Long cardNumber, Timestamp start, Timestamp stop);


    PersonnelBloodPressureEntity save(PersonnelBloodPressureEntity entity);
}
